const sequelize = require("./db");
const { DataTypes } = require("sequelize");

const Carousel = sequelize.define(
    "Carousel",
    {
        carousel_id: {
        type: DataTypes.INTEGER,
        autoIncrement: true,
        primaryKey: true,
      },
      imgPath: {
        type: DataTypes.STRING(50),
        allowNull: false,
      },
      describes:{
        type: DataTypes.STRING(50),
        allowNull: false,
      }
    },
    {  
      paranoid: true, //从此以后，该表的数据不会真正的删除，而是增加一列deletedAt，记录删除的时间
      logging: null,
    }
)

module.exports = Carousel;